package com.atguigu.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @ClassName OrderZKController
 * @Author VCR
 * @Date 2021/12/22 23:55
 * @Version 1.0
 */
@RestController
@Slf4j
public class OrderZKController {
    public static final String IINVOME_URL = "http://cloud-provider-payment";

    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/consumer/payment/zk")
    public String paymentInfo() {
        String template = restTemplate.getForObject(IINVOME_URL + "/payment/zk", String.class);
        return template;
    }
}
